// @ts-ignore
/* eslint-disable */
import request from "../utils/request";

/** 此处后端没有提供注释 GET /api/prompt */
export async function promptControllerFindAll(options?: {
  [key: string]: any;
}) {
  return request<API.Prompt[]>("/api/prompt", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /api/prompt */
export async function promptControllerCreate(
  body: API.CreatePromptDto,
  options?: { [key: string]: any }
) {
  return request<API.Prompt>("/api/prompt", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /api/prompt/${param0} */
export async function promptControllerFindOne(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.PromptControllerFindOneParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/prompt/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 DELETE /api/prompt/${param0} */
export async function promptControllerRemove(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.PromptControllerRemoveParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Prompt>(`/api/prompt/${param0}`, {
    method: "DELETE",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 PATCH /api/prompt/${param0} */
export async function promptControllerUpdate(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.PromptControllerUpdateParams,
  body: API.UpdatePromptDto,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Prompt>(`/api/prompt/${param0}`, {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}
